package c2.advanced.business;

import c2.advanced.business.common.CommonModule;
import c2.advanced.business.common.fight.InternalFightHandler;
import c2.advanced.business.common.video.VideoHallHandler;
import c2.advanced.business.help.AdvancedHelpFacade;
import c2.advanced.share.*;
import lombok.Getter;
import lombok.Setter;

public abstract class AdvancedBody {

    @Getter
    @Setter
    protected String code;

    // 以下是共享服务区域
    public ApiFacade api = new ApiFacade();
    public TimeFacade time = new TimeFacade();
    public TableFacade table = new TableFacade();
    public RpcSuit rpc = createRpc();
    public PlayFacade play = new PlayFacade(this);
    public abstract DbFacade dbBase();
    public final InternalFightHandler fightHandler = InternalFightHandler.INSTANCE;
    public final VideoHallHandler videoHandler = VideoHallHandler.INSTANCE;

    // 以下是业务逻辑区域
    public CommonModule common = new CommonModule(this);
    public AdvancedHelpFacade help = new AdvancedHelpFacade(this);


    protected abstract RpcSuit createRpc();

}
